count all elements with class jquery

70

count all elements with class jquery -

var numItems = $('.item').length;

get count of div by class -

var numItems = $('.item').length;

get class count in jquery -

// Gets the number of elements with class yourClass
var numItems = $('.yourclass').length

Comments

Submit
0 Comments